package com.gome.ocean.dao.datax;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.gome.ocean.dao.model.datax.JobBO;


/**
 * <p>
 * 标题:
 * </p>
 * <p>
 * 描述:
 * </p>
 * 
 * @作者 liuqingxia
 * @创建时间 2016-01-20 12:24:10
 * @版本 1.00
 */
@Repository("jobDAO")
public interface JobDAO {

    int insertJob(JobBO jobBO);

    int removeJobById(Long id);

    int updateJobBO(JobBO jobBO);

    JobBO findJobById(Long id);

    List<JobBO> findAllJobs(RowBounds rowBounds);

    List<JobBO> findJobBySubmitUser(@Param("submitUser") String submitUser, RowBounds rowBounds);

    List<JobBO> findJobByPipelineName(@Param("pipelineName") String pipelineName, RowBounds rowBounds);

    List<JobBO> findJobBySubmitUserAndPipelineName(@Param("submitUser") String submitUser,
                                                   @Param("pipelineName") String pipelineName, RowBounds rowBounds);

    List<JobBO> findJobByProjectNames(@Param("projectNames") List<String> projectNames, RowBounds rowBounds);

    List<JobBO> findJobByExecuteType(@Param("type") int type, RowBounds rowBounds);

    List<JobBO> findJobsByExecuteTypeAndProjectNames(@Param("type") int type,
                                                     @Param("projectNames") List<String> projectNames,
                                                     RowBounds rowBounds);

    List<JobBO> findAllJobList();

    public List<JobBO> findJobsByIntroduce(@Param("introduce") String introduce, RowBounds rowBounds);

    public List<JobBO> findJobsByIntroduceAndProject(@Param("introduce") String introduce,
                                                     @Param("projectNames") List<String> projectNames,
                                                     RowBounds rowBounds);
}
